<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <link rel="stylesheet" href="../../../assets/css/base.css">
  <style>
    .flex-container {
      display: flex;
      /*
        justify-content 主轴方向 子元素的对齐方式
         ● center
         ● start
         ● end
         ● flex-start
         ● flex-end
         ● left
         ● right
         ● space-between
         ● space-around
         ● space-evenly
       */
      justify-content: center;
      width: 400px;
      height: 100px;
      border: 1px solid black;
    }

    .flex-container>div {
      width: 100px;
      height: 100px;
    }

    .flex-container>div:nth-child(1) {
      background-color: red;
    }

    .flex-container>div:nth-child(2) {
      background-color: orange;
    }

    .flex-container>div:nth-child(3) {
      background-color: yellow;
    }

    .start {
      justify-content: start;
    }

    .center {
      justify-content: center;
    }

    .end {
      justify-content: end;
    }

    .space-between {
      justify-content: space-between;
    }

    .space-around {
      justify-content: space-around;
    }

    .space-evenly {
      justify-content: space-evenly;
    }
  </style>
</head>

<body>
  <div class="float-left margin-left-10">
    <p class="title">start</p>
    <div class="flex-container start">
      <div></div>
      <div></div>
      <div></div>
    </div>
  </div>

  <div class="float-left margin-left-10">
    <p class="title">center</p>
    <div class="flex-container center">
      <div></div>
      <div></div>
      <div></div>
    </div>
  </div>

  <div class="float-left margin-left-10">
    <p class="title">end</p>
    <div class="flex-container end">
      <div></div>
      <div></div>
      <div></div>
    </div>
  </div>

  <div class="float-left margin-left-10">
    <p class="title">space-between</p>
    <div class="flex-container space-between">
      <div></div>
      <div></div>
      <div></div>
    </div>
  </div>

  <div class="float-left margin-left-10">
    <p class="title">space-around</p>
    <div class="flex-container space-around">
      <div></div>
      <div></div>
      <div></div>
    </div>
  </div>

  <div class="float-left margin-left-10">
    <p class="title">space-evenly</p>
    <div class="flex-container space-evenly">
      <div></div>
      <div></div>
      <div></div>
    </div>
  </div>
</body>

</html>